home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Sendrecv.z / MPI_Sendrecv
Encoding:
Text File  |  2002-10-03  |  5.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____SSSSEEEENNNNDDDDRRRREEEECCCCVVVV((((3333))))                                                MMMMPPPPIIII____SSSSEEEENNNNDDDDRRRREEEECCCCVVVV((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____SSSSeeeennnnddddrrrreeeeccccvvvv - Sends and receives a message
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      C:
  13.  
  14.           #include <mpi.h>
  15.  
  16.           int MPI_Sendrecv( _s_e_n_d_b_u_f, _s_e_n_d_c_o_u_n_t, _s_e_n_d_t_y_p_e, _d_e_s_t,
  17.           _s_e_n_d_t_a_g, _r_e_c_v_b_u_f, _r_e_c_v_c_o_u_n_t, _r_e_c_v_t_y_p_e, _s_o_u_r_c_e, _r_e_c_v_t_a_g,
  18.           _c_o_m_m, _s_t_a_t_u_s )
  19.           void         *_s_e_n_d_b_u_f;
  20.           int           _s_e_n_d_c_o_u_n_t;
  21.           MPI_Datatype  _s_e_n_d_t_y_p_e;
  22.           int           _d_e_s_t, _s_e_n_d_t_a_g;
  23.           void         *_r_e_c_v_b_u_f;
  24.           int           _r_e_c_v_c_o_u_n_t;
  25.           MPI_Datatype  _r_e_c_v_t_y_p_e;
  26.           int           _s_o_u_r_c_e, _r_e_c_v_t_a_g;
  27.           MPI_Comm      _c_o_m_m;
  28.           MPI_Status   *_s_t_a_t_u_s;
  29.  
  30.  
  31.      C++:
  32.  
  33.           #include <mpi.h>
  34.  
  35.           void Comm::Sendrecv(
  36.           const void        *_s_e_n_d_b_u_f,
  37.           int               _s_e_n_d_c_o_u_n_t,
  38.           const Datatype&   _s_e_n_d_t_y_p_e,
  39.           int               _d_e_s_t,
  40.           int               _s_e_n_d_t_a_g,
  41.           void              *_r_e_c_v_b_u_f,
  42.           int               _r_e_c_v_c_o_u_n_t,
  43.           const Datatype&   _r_e_c_v_t_y_p_e,
  44.           int               _s_o_u_r_c_e,
  45.           int               _r_e_c_v_t_a_g) const
  46.  
  47.  
  48.      Fortran:
  49.  
  50.           INCLUDE "mpif.h" (or USE MPI)
  51.  
  52.           <type> SENDBUF(*), RECVBUF(*)
  53.           INTEGER _s_e_n_d_c_o_u_n_t, _s_e_n_d_t_y_p_e, _d_e_s_t, _s_e_n_d_t_a_g,
  54.           _r_e_c_v_c_o_u_n_t, _r_e_c_v_t_y_p_e, _s_o_u_r_c_e, _r_e_c_v_t_a_g,  _c_o_m_m,
  55.           _s_t_a_t_u_s(MPI_STATUS_SIZE), _i_e_r_r_o_r
  56.  
  57.           CALL MPI_SENDRECV(*_s_e_n_d_b_u_f, _s_e_n_d_c_o_u_n_t, _s_e_n_d_t_y_p_e, _d_e_s_t,
  58.           _s_e_n_d_t_a_g, *_r_e_c_v_b_u_f, _r_e_c_v_c_o_u_n_t, _r_e_c_v_t_y_p_e, _s_o_u_r_c_e,
  59.           _r_e_c_v_t_a_g, _c_o_m_m, _s_t_a_t_u_s(MPI_STATUS_SIZE), _i_e_r_r_o_r)
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____SSSSEEEENNNNDDDDRRRREEEECCCCVVVV((((3333))))                                                MMMMPPPPIIII____SSSSEEEENNNNDDDDRRRREEEECCCCVVVV((((3333))))
  71.  
  72.  
  73.  
  74. SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
  75.      This release implements the MPI 1.2 standard, as documented by the MPI
  76.      Forum in the spring 1997 release of _M_P_I:  _A _M_e_s_s_a_g_e _P_a_s_s_i_n_g _I_n_t_e_r_f_a_c_e
  77.      _S_t_a_n_d_a_r_d.
  78.  
  79. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  80.      The MMMMPPPPIIII____SSSSeeeennnnddddrrrreeeeccccvvvv routine sends and receives a message.  This routine
  81.      accepts the following parameters:
  82.  
  83.      _s_e_n_d_b_u_f        Specifies the initial address of the send buffer (choice)
  84.  
  85.      _s_e_n_d_c_o_u_n_t      Specifies the number of elements in the send buffer
  86.                     (integer)
  87.  
  88.      _s_e_n_d_t_y_p_e       Specifies the type of elements in the send buffer (handle)
  89.  
  90.      _d_e_s_t           Specifies the rank of the destination (integer)
  91.  
  92.      _s_e_n_d_t_a_g        Specifies the send tag (integer)
  93.  
  94.      _r_e_c_v_c_o_u_n_t      Specifies the number of elements in the receive buffer
  95.                     (integer)
  96.  
  97.      _r_e_c_v_t_y_p_e       Specifies the type of elements in the receive buffer
  98.                     (handle)
  99.  
  100.      _s_o_u_r_c_e         Specifies the rank of the source (integer)
  101.  
  102.      _r_e_c_v_t_a_g        Specifies the receive tag (integer)
  103.  
  104.      _c_o_m_m           Specifies the communicator (handle)
  105.  
  106.      _r_e_c_v_b_u_f        Returns the initial address of the receive buffer (choice)
  107.  
  108.      _s_t_a_t_u_s         Returns the status object (as it relates to the receive
  109.                     operation) (status)
  110.  
  111.      _i_e_r_r_o_r         Specifies the return code value for successful completion,
  112.                     which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the
  113.                     mmmmppppiiiiffff....hhhh file.
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.